<!DOCTYPE html>
<html>

<head>
    <title></title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <link href="../lib/bootstrap/bootstrap.min.css" rel="stylesheet">
    <link href="../lib/weui-master/dist/style/weui.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../lib/fontawesome/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../lib/SeedsUI-master/app/scripts/lib/seedsui/seedsui.min.css">
    <link rel="stylesheet" type="text/css" href="../sys/css/foot.css">
    <style>
    body,section {
        background-color: #fff;
    }
    section {
        padding-top: 3%;
        box-sizing: border-box;
        width: 100%;
        overflow-y: auto;
    }
    
    .item {
        width: 96%;
        height: 95px;
        margin-left: 2%;
        margin-bottom: 3%;
  /*      background-color: pink;*/
        border-bottom: 1px solid #ddd;
    }
    
    .item p {
        padding: 0px 5px;
        margin: 0;
    }
    
    .item p:nth-child(1) {
        font-size: 16px;
        color:#333;
    }
    
    .item p:nth-child(2) {
        font-size: 14px;
        height: 40px;
        text-overflow: ellipsis;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        color:#999;
    }
    
    .item p:nth-child(3) {
        font-size: 13px;
        text-align: right;
        color:#888;
        padding-top: 3px;

    }
    .item p span{
        width: 40px;
        text-align: left;
        margin-left: 10px;
    }
    </style>
</head>

<body>
    <div class="box">
        <section>
            <div class="item" v-for="topic in topics" @click="jumptotopic(id)">
                <p v-text="topic.title"></p>
                <p v-text="topic.content"></p>
                <p><i class="fa fa-comment-o"></i><span v-text="topic.num">11111</span></p>
            </div>
        </section>
        <footer>
            <my-foot @choose="choosemune"></my-foot>
        </footer>
    </div>
    <script src="../lib/jquery/jquery-1.11.0.min.js"></script>
    <script src="../lib/vue/vue.js"></script>
    <script src="../sys/js/foot.js"></script>
    <script src="../data/data.json"></script>
    <script>
    $(function() {
        var windowHeight = $(window).height();
        $(".box").height(windowHeight - 52);
        $("section").height(windowHeight - 52 - windowHeight * 0.03);



        var box = new Vue({
            el: '.box',
            data: {
                topics
                
            },
            components: {
                myFoot
            },
            methods: {
                choosemune: function(i) {
                    window.location.href = menulist[i];
                },
                jumptotopic:function(){
                    window.location.href="topic.html";
                }

            }
        })
        $("footer ul li").removeClass("active");
        $("footer ul li:nth(3)").addClass("active");
    })
    </script>
</body>

</html>
